﻿namespace FFF.Test.Application.AppServices.PublicService.File
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Text;
    using System.Threading.Tasks;
    using Abp.Application.Services;
    using Abp.Auditing;
    using Abp.EntityFrameworkCore;
    using Abp.Runtime.Caching;
    using Abp.UI;
    using Aliyun.OSS;
    using Aliyun.OSS.Util;
    using Microsoft.AspNetCore.Authorization;
    using Microsoft.AspNetCore.Http;
    using Microsoft.AspNetCore.Mvc;
    using Microsoft.AspNetCore.StaticFiles;
    using FFF.Test.Application.AppServices;
    using FFF.Test.Application.PublicService.AppService.File.Dto;
    using FFF.Test.DataAccess.Framework;
    using FFF.Test.Entity;
    using FFF.Test.Util.Consts;
    using FFF.Test.Util.Web;
    using Ydm.Extensions;

    /// <summary>
    /// File的使用
    /// </summary>
    public interface IFileAppService : IApplicationService
    {
        /// <summary>
        /// 上传文件
        /// </summary>
        /// <param name="type">文件的类型</param>
        /// <returns>文件存储的id的值</returns>
        Task<UploadFileOutDto> UploadFile(string type);

        /// <summary>
        /// 删除文件
        /// </summary>
        /// <param name="filePath">文件路径</param>
        /// <returns>task</returns>
        Task DeleteFile(string filePath);

        /// <summary>
        /// 下载文件
        /// </summary>
        /// <param name="type">文件的类型</param>
        /// <returns>文件</returns>
        Task<FileResult> DownFile(string type);

        /// <summary>
        /// 文件上传框下载文件
        /// </summary>
        /// <param name="filePath">文件路径</param>
        /// <returns>文件</returns>
        Task<FileResult> DownFileForUpload(string filePath);
    }
}